<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/common.jsp"%>
<%@ include file="/common/taglibs.jsp"%>
<html>
  <head>
<%@ include file="/common/meta.jsp"%>      
    <title>修改系统公告</title>
	<link href="<c:url value='/styles/form.css'/>" type="text/css" rel="stylesheet">
	<script language="javascript" type="text/javascript" 
			src="<%=contextPath %>/scripts/common-validator.js"></script>
	<script type="text/javascript">
function validateForm(form){
	return true;	
}
		function dothis(text){
			var value=text.value;
			var i;
			for( i = 0; i < value.length; i++){
				if (value.charCodeAt(i) < 48 || value.charCodeAt(i) > 57){
					$("span1").innerHTML="<font color='red'>输入必须为整数！</font>";
					$("affichePo.validDays").value = "" ;
					return false;
				}
			}	
			$("span1").innerHTML="<font color='green'>输入通过！</font>";
		}
	</script>	
  </head>
	<body bgcolor="#F2FEF4">
		<div align="center">
		<div id="detailheader">
			<img src="<%=request.getContextPath()%>/images/main/main_ban01Dot.png" />
			<div>修改系统公告</div>
		</div>
		<br/><br/>   
		<html:form action="/affiche.do?method=update" method="post" onsubmit="return validateForm(this);">			
			<div class="formTable" style="width:90%;">
				<div class="formTitle">
					<div class="formTitleL"></div>
					<div class="formTitleM">系统公告基本信息</div>
					<div class="formTitleR"></div>
				</div>
				<div class="formContent">
							<table width="90%">
								<tr>
									<td align="left">标题:</td>
									<td align="left" nowrap="nowrap">
										<html:text property="affichePo.title" />
										<html:hidden property="affichePo.afficheId"/>
									</td>
								</tr>
								<tr>
									<td align="left">类型:</td>
									<td align="left" nowrap="nowrap">
										<html:select property="affichePo.type" style="width=130;">
											<html:option value="0">公告</html:option>
											<html:option value="1">新闻</html:option>
											<html:option value="2">通知</html:option>
											<html:option value="3">紧急通知</html:option>	
										</html:select>
									</td>
								</tr>
								<tr>
									<td align="left">内容:</td>
									<td align="left">
									<html:text property="affichePo.content" />
									</td>
								</tr>
								<tr>
									<td align="left">有效天数:</td>
									<td align="left">
									<html:text property="affichePo.validDays" onblur="dothis(this);"/>
									<span id="span1"></span>
									</td>
								</tr>	
								<tr>
									<td align="center" colspan="2">
										<html:submit styleClass="btn_Xp_Bg0" value="确 定"/>&nbsp;&nbsp;&nbsp;
										<html:reset styleClass="btn_Xp_Bg0" value="重 置"/>
									</td>
								</tr>
							</table>
				</div>
			</div>
		</html:form>
		</div>
	</body>
</html>
